﻿function createXMLHttpRequest() 
{
    var xmlhttp = false;
    if (window.XMLHttpRequest)
    {
        xmlhttp = new XMLHttpRequest();
    }
    else if (window.ActiveXObject)// code for IE
    {
        try 
        {
            xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
        } 
        catch (e) 
        {
            try 
            {
                xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
            } 
            catch (E) 
            {
                xmlhttp=false;
            }
        }
    }
    return xmlhttp;
}
